
package com.example.testutil.util.sql;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class DbManager {
    private static DbManager manager;

    private MySqliteOpenHelper mHelper;

    private SQLiteDatabase db;

    private DbManager(Context context) {
        mHelper = MySqliteOpenHelper.getInstance(context);
        if (db == null) {
            db = mHelper.getReadableDatabase();
        }
    }

    public static DbManager newinstance(Context context) {
        if (manager == null) {
            manager = new DbManager(context);
        }
        return manager;
    }

    public SQLiteDatabase getdDatabase() {
        return db;
    }
}
